﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Google.Translates.Core;

namespace ml_test_google_trans.Translate
{
    public partial class DetectTheSentence : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnDetect_Click(object sender, EventArgs e)
        {
            var startDate = DateTime.Now;
            var reVal = new TranslatorByGoogleHttp().DetectTheSentence(txtSrc.Text);
            lblMsg.Text = "The word's Language Code is :[ "+reVal+" ]";
            lblMsg.Text += "<br/><br />Uses Time : [" + (DateTime.Now - startDate).TotalMilliseconds + "]ms";
        }
    }
}
